@extends('admin.layout.index')
@section('content')
<div class="mws-panel grid_8">
@if (count($errors) > 0)
    <div class="mws-form-message error">
    	错误提醒
        <ul>
            @foreach ($errors->all() as $error)
                <li>{{ $error }}</li>
            @endforeach
        </ul>
    </div>
@endif
<div class="mws-panel-header">
    	<span>用户添加</span>
    </div>
    <div class="mws-panel-body no-padding">
    	<form class="mws-form" action="/admin/pic/update" method="post" enctype="multipart/form-data">
        <input type="hidden" name="id" value="{{$data['id']}}">
        <input type="hidden" name="oldpic" value="{{$data['pic']}}">
    	{{ csrf_field()}}
    		<div class="mws-form-inline">
    			<div class="mws-form-row">
    				<label class="mws-form-label">图片名</label>
    				<div class="mws-form-item">
    					<input class="small" type="text" name="name" value="{{$data['name']}}">
    				</div>
    			</div>
    			
    			  <div class="mws-form-row" style="width:660px;display:inline-block">
                    <label class="mws-form-label">图片</label>
                    <div class="mws-form-item" >
                    	<img src="/upload/pic/{{$data['pic']}}" alt="" style="width:300px">
                        <input type="file" name="pic" value="">
                    </div>
                </div>
    			
                <div class="mws-form-row">
                    <label class="mws-form-label">是否禁用</label>
                     <div class="mws-form-item clearfix">
                        <ul class="mws-form-list inline">
                            <li><input type="radio" name="status" value="1" @if($data['status'] == '1') checked @endif checked> <label>否</label></li>
                            <li><input type="radio" name="status" value="2" @if($data['status'] == '2') checked @endif> <label>是</label></li>
                        </ul>
                    </div>
                </div>

                     <div class="mws-form-row" style="width:660px;display:inline-block">
                    <label class="mws-form-label">url地址</label>
                    <div class="mws-form-item" >
                      <input type="text" name="url" value="{{$data['url']}}" style="width:500px">
                    </div>
                </div>

    		</div>

             
    		<div class="mws-button-row">
    			<input value="修改" class="btn btn-danger" type="submit">
    			<input value="重置" class="btn " type="reset">
    		</div>
    	</form>
    </div>    	
</div>
@endsection